export default {
  data () {
    return {
      // 用印下拉数据
      printingType: [
        {
          id: "",
          type: ""
        }
      ],
      // 关联项目
      relationList: [
        {
          area: '',
          beginReport: '',
          chargeName: '',
          cover: '',
          endPic: '',
          endReport: '',
          heTongMoney: '',
          id: '',
          jiaFangName: '',
          name: '',
          planBeginDate: '',
          planEndDate: '',
          realBeginDate: '',
          realEndDate: '',
          statu: ''
        }
      ],
      // 部门数据
      depList: [
        {
          deptName: "",
          id: "",
          pid: "",
          type: "",
        }
      ],
      buildTeamList: [
        {
          affiliatingArea: "",
          categoriesOfConstructionTeamsId: "",
          constructionTeamNumber: "",
          contactNumber: "",
          // 姓名
          contacts: "",
          createdDate: "",
          financialStatus: "",
          id: "",
          nameOfConstructionTeam: "",
          situationOfStaff: "",
        }
      ],
      // 经办人下拉
      staffList: [
        {
          account: "",
          birthday: "",
          createBy: "",
          createDate: "",
          dept: "",
          deptId: "",
          email: "",
          id: "",
          identityCard: "",
          kaoQinId: "",
          leader: "",
          name: "",
          password: "",
          phone: "",
          postList: "",
          salt: "",
          sex: "",
          status: "",
          touXiang: "",
          updateBy: "",
          updateDate: "",
        }
      ],
      pricingList: [
        {
          id: "",
          valuation: ""
        }
      ]
    }
  },
  methods: {
    // 获取用印类型
    getPrinting () {
      this.$contractApi.getPrinting().then(res => {
        if (res.data.code == 200) {
          this.printingType = res.data.data
        } else {
          this.$message.error(res.data.msg)
        }
      })
    },
    // 获取关联项目
    getRelation () {
      this.$contractApi.relationSelect().then(res => {
        if (res.data.code == 200) {
          this.relationList = res.data.data
        }
      })
    },
    // 部门下拉框
    depSelect () {
      this.$contractApi.depSelect().then(res => {
        if (res.data.code == 200) {
          this.depList = res.data.data
        }
      })
    },
    // 乙方单位下拉
    buildTeamSelect () {
      this.$contractApi.buildTeamSelect().then(res => {
        this.buildTeamList = res.data.data
      })
    },
    // 经办人下拉
    staffSelect () {
      this.$contractApi.staffSelect().then(res => {
        if (res.data.code == 200) {
          this.staffList = res.data.data
        } else {
          this.$message.success(res.data.msg)
        }
      })
    },
    // 计价方式
    pricingSelect () {
      this.$contractApi.pricingSelect().then(res => {
        if (res.data.code == 200) {
          this.pricingList = res.data.data
        }
      })
    }
    // 
  },
  mounted () {

  }
}